import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    // mode: 'history',
    routes: [{
            path: '/',
            // redirect: '/login'
            component: resolve => require(['../page/account/index.vue'], resolve)
        },
        {
            path: '/way',
            component: resolve => require(['../page/account/way.vue'], resolve)
        },
        {
            path: '/forgetpwd',
            component: resolve => require(['../page/account/forgetpwd.vue'], resolve)
        },
        {
            path: '/selectsub',
            component: resolve => require(['../page/SelectSub/SelectSub.vue'], resolve)
        },
        {
            path: '/mainIndex',
            component: resolve => require(['../page/mainIndex/mainIndex.vue'], resolve),
            // meta:{keepAlive:true}
        },
//      {
//          path: '/indexPage',
//          component: resolve => require(['../page/SelectSub/SelectSub.vue'], resolve)
//      },
        {
            path: '/problemset',
            component: resolve => require(['../page/ProblemSet/ProblemSet.vue'], resolve)
        },
        {
            path: '/fixedexercise',
            component: resolve => require(['../page/FixedExercise/FixedExercise.vue'], resolve),
            meta: { keepAlive: false }
        },
        // {
        //     path: '/fixedrefresh',
        //     component: resolve => require(['../page/FixedExercise/FixedVoid.vue'], resolve),
        //     meta: { keepAlive: false }
        // },
        {
            path: '/doexam',
            component: resolve => require(['../page/DoExam/DoExam.vue'], resolve),
            meta: { keepAlive: false }
        },
        // {
        //     path: '/readme',
        //     component: resolve => require(['../components/common/Home.vue'], resolve),
        //     children: [{
        //             path: '/',
        //             component: resolve => require(['../components/page/Readme.vue'], resolve)
        //         },
        //         {
        //             path: '/basetable',
        //             component: resolve => require(['../components/page/BaseTable.vue'], resolve)
        //         },
        //         {
        //             path: '/baseform',
        //             component: resolve => require(['../components/page/BaseForm.vue'], resolve)
        //         },
        //         {
        //             path: '/drag',
        //             component: resolve => require(['../components/page/DragList.vue'], resolve) // 拖拽列表组件
        //         },
        //         {
        //             path: '/sprintlist',
        //             component: resolve => require(['../components/page/SprintList.vue'], resolve) // 拖拽列表组件
        //         }
        //     ]
        // },
        {
            path: '/login',
            component: resolve => require(['../page/account/Login.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/'
        }
    ]
})
